home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
676-700
/
680
/
atap
/
sourcecode
/
getmetricfilename.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-18
|
993b
|
38 lines
char *GetMetricFilename(char typefaceNames[][68])
/* An unusual routine that uses the FindBaseName() function below.
From four or less typeface names it extracts a family base name
and appends ".metric" to it. If the typefaces belong to the
same family you get a filename "familyName.metric". If this
function returns a null, these types don't belong together.
This function is overridden only if the user supplies an
alternate .metric filename back in main(). */
{
static char familyName[68],baseNames[4][68];
static int match,index;
match=1;
familyName[0]=0;
for (index=0;index<4;index++)
strcpy(baseNames[index],FindBaseName(typefaceNames[index]));
for (index=1;index<3;index++)
if (strcmp(baseNames[index],baseNames[3])!=0)
match=0;
if (strcmp(baseNames[0],baseNames[3])!=0)
if (strcmp(typefaceNames[0],baseNames[3])!=0)
match=0;
if (match!=0)
{
strcpy(familyName,baseNames[3]);
strcat(familyName,".metric");
}
return(familyName);
};